{% extends 'apply_base.html' %}

{% block htmltitle %}会议室使用申请{% endblock %}

{% block top_title %}
    <h1>会议室使用申请</h1>
{% endblock %}

{% block htmlhead %}
    {% load html_tools %}
    {{ 'jQuery/jquery-1.11.0.min.js'  | as_js  }}
    {{ 'checkMonday.js'  | as_js  }}
{% endblock %}

{% block main_content %}
    <h6 style="color:red;text-align:center;line-height:300%">石头坞一楼会议室周一12：00-14：00暂停申请，谢谢合作!</h6>
    <form method="POST" enctype="multipart/form-data" action="{{ post_url }}">
        {% csrf_token %}
        <table>
            <tr>
                <td class="title">会议主题</td>
                <td>
                    {{ form.meeting_topic }}
                    <div class="error">
                    {% for error in form.meeting_topic.errors %}
                        {{ error }}&nbsp;
                    {% endfor %}
                    </div>
                </td>
                <td class="title">申请部门</td>
                <td>
                    {{ form.organization }}
                    <input type="text" disabled="disabled" value="{{user.organization}}"/>
                </td>
            </tr>
            <tr>
                <td class="title">申请人姓名</td>
                <td>
                    {{ form.applicant_name }}
                    <div class="error">
                    {% for error in form.applicant_name.errors %}
                        {{ error }}&nbsp;
                    {% endfor %}
                    </div>
                </td>
                <td class="title">联系电话</td>
                <td>
                    {{ form.applicant_phone_number }}
                    <div class="error">
                    {% for error in form.applicant_phone_number.errors %}
                        {{ error }}&nbsp;
                    {% endfor %}
                    </div>
                </td>
            </tr>
            <tr>
                <td class="title">会议室</td>
                <td colspan="3">
                    {{ form.place }}
                    <div class="error">
                    {% for error in form.place.errors %}
                        {{ error }}&nbsp;
                    {% endfor %}
                    </div>
                </td>
            </tr>
            <tr>
                <td class="title">会议时间</td>
                <td colspan="3">
                    {{ form.date }}
                    <span style="color:red">(只能申请14天内的场地)</span>
                    <div class="error">
                    {% for error in form.date.errors %}
                        {{ error }}&nbsp;
                    {% endfor %}
                    </div>
                </td>
            </tr>
            <tr>
                <td class="title">会议时段</td>
                <td colspan="3">
                    {{ form.time }}
                    <div class="error">
                    {% for error in form.time.errors %}
                        {{ error }}&nbsp;
                    {% endfor %}
                    </div>
                </td>
            </tr>
            <tr>
                <td class="title">会议内容简介</td>
                <td colspan="3">
                    {{ form.meeting_summary }}
                    <div class="error">
                    {% for error in form.meeting_summary.errors %}
                        {{ error }}&nbsp;
                    {% endfor %}
                    </div>
                </td>
            </tr>
            <tr>
                <td class="title">备注(可选)</td>
                <td colspan="3">
                    {{ form.remarks }}
                    <div class="error">
                    {% for error in form.remarks.errors %}
                        {{ error }}&nbsp;
                    {% endfor %}
                    </div>
                </td>
            </tr>
            <tr>
                <td colspan="4">
                    <p>申请说明：<br />1.点击上面各个空白方格填写相关资料，全部填完后点击下面“提交”按钮完成网上提交。<br />2.同一个会议室相同的时间段只能提供一个申请，请不要选择已有人申请的时间段。<br />3.石头坞一楼、二楼会议室为校学生会、社团联合会专用会议室，其它组织如要使用需向校学生会、社团联合会办公室提出申请，并由校学生会、社团联合会办公室代为网上申请。</p>
                </td>
            </tr>
        </table>
        
        <div class="error" style="margin-left:50%">
            {% for error in form.non_field_errors %}
                {{ error }}&nbsp;
            {% endfor %}
        </div>        
        <div class="button_container">
            <input type="submit" value="提交" />
            <input type="reset" value="重置" style="margin-left:100px;"/>
        </div>
    </form>
{% endblock %}

